package com.one.material.feign;

import com.one.material.entity.Material;
import com.one.material.struct.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author windows
 */
@FeignClient(value = "material-client")
public interface FeignMaterial {

    /**
     * 返回对象集合JSON数据
     *
     * @return String
     */
    @RequestMapping("/material/getMaterialAll")
    public String getMaterialAll();

    /**
     * 获取分页
     * @param material  material
     * @param pageNum  当前页
     * @param pageSize 每页显示条数
     * @return 集合
     */
    public PageResult<Material> getMaterialPageAll(@RequestBody Material material,
                                                   @PathVariable("pageNum") Integer pageNum,
                                                   @PathVariable("pageSize") Integer pageSize);
}
